package Lambda表达式;


public class 使用Calculator接口 {

	public static void main(String[] args) {
		
		//实现类、
		Calculator calculator = new CalculatorImpl(); 
		method( calculator );
		
		// lambda
		method( (a,b) -> a + b );
	}

	public static void method( Calculator calculator ){
		int result = calculator.sum(100, 200);
		System.out.println("结果是：" + result) ;
	}
}
